package hooks

import (
	"fmt"

	"google.golang.org/grpc"

	"atomgit.com/atomgit_dev/git-hooks/pkg/config"
)

// getSatelliteConn creates a connection to grpc server.
func getSatelliteConn() (*grpc.ClientConn, error) {
	addr := fmt.Sprintf("%s:%d", config.Cfg.ServerEndPoint, config.Cfg.ServerPort)
	return grpc.Dial(addr, grpc.WithInsecure())
}
